home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr52 / tw150d.zip / GENHLP.DOC < prev    next >
Text File  |  1993-04-01  |  5KB  |  135 lines

  1.  
  2.  
  3.                     twBRBrowse()
  4.  
  5.         twBRBrowse() is a general purpose database
  6.         browser. It is capable of carrying out all
  7.         the functions found in the browse in DBU with
  8.         many enhancements.
  9.  
  10.         There is built in mouse support, scoping and
  11.         the ability to pass executable code to the
  12.         function through the use of actionkeys. You
  13.         may also obtain  a reference to the browse and
  14.         its full cargo structure, and modify its
  15.         behaviour on the fly.
  16.  
  17.         The default keystroke handling in twBRBrowse()
  18.         can be overidden by assigning ActionKey blocks
  19.         to replace the defaults. ActionKeys are
  20.         processed BEFORE the default keystroke
  21.         handler. This method was deemed easier for
  22.         programmers than the method of passing an
  23.         entire ApplyKey function.  Both methods will
  24.         be made available in a future release. The
  25.         defaults vary according to the Autolite
  26.         setting:
  27.  
  28.            If lAlite is False, the right and left
  29.            arrow keys pan the browse. If it is true,
  30.            the cursor is moved one column.
  31.  
  32.         The built in Get System allows the user to
  33.         perform gets on the entire browse or only on
  34.         selected columns. The ability to define a
  35.         reader makes the browse totally configureable
  36.         to your needs.
  37.  
  38.         An append mode is included, but editing and
  39.         appending to databases is best performed by
  40.         executing the task through ActionKeys.
  41.  
  42.         Both vertical and horizontal scrollbars are
  43.         available. If you allow scrollbars, the
  44.         horizontal one is displayed only if the
  45.         entire browse will not fit within the window.
  46.  
  47.         twBRBrowse() has  a complicated parameter
  48.         list. The simplest way to set up the browse
  49.         is to  follow the following format:
  50.  
  51.  
  52.         1. Define your parameters:
  53.  
  54.         LOCAL wT, wL, wB, wR, aColumns, cTitle, ;
  55.               cTopKey, bScopeBlock, ;
  56.               lEditFlag, aActionKeys, wColor, ;
  57.               wSType, wFType, wFColor, lScBar, ;
  58.               lMsgs, lAlite, nFreeze, lStabilize, ;
  59.               bPreRun, bPostRun, nExitKey, ;
  60.               aSeparators, lOKAppend, lSound
  61.  
  62.         2. Use a template to define them:
  63.  
  64.         wT          :=    //  Top of window.
  65.         wL          :=    //  Left of window.
  66.         wB          :=    //  Bottom of window.
  67.         wR          :=    //  Right of window.
  68.         aColumns    :=    //  Column definitions.
  69.         cTitle      :=    //  Window title.
  70.         cTopKey     :=    //  Initial scope key.
  71.         bScopeBlock :=    //  Block for filter.
  72.         lEditFlag   :=    //  Allow edits?
  73.         aActionKeys :=    //  Action key blocks.
  74.         wColor      :=    //  Window/browse colour.
  75.         wSType      :=    //  Window shadow type.
  76.         wFType      :=    //  Window frame type.
  77.         wFColor     :=    //  Window frame colour.
  78.         lScBar      :=    //  Use scrollbars?
  79.         lMsgs       :=    //  Display setup messages.
  80.         lAlite      :=    //  Use autolite?
  81.         nFreeze     :=    //  Columns to freeze.
  82.         lStabilize  :=    //  Stabilize before keys?
  83.         bPreRun     :=    //  Setup block.
  84.         bPostRun    :=    //  Exit block.
  85.         nExitKey    :=    //  Alternate EXIT key.
  86.         aSeparators :=    //  Column separators.
  87.         lOKAppend   :=    //  Allow appends?
  88.         lSound      :=    //  Allow sound?
  89.  
  90.         3. Define the columns:
  91.  
  92.         AADD( aColumns, { cHead, bBlk, nWid, cFoot, ;
  93.                           lEdit, cPic, bWhn, bVld, ;
  94.                           bRdr, aClr, bClr, cCsep, ;
  95.                           cHsep, cFsep }) 
  96.         etc.
  97.  
  98.         4. Define the ActionKeys:
  99.  
  100.         AADD( aActionKeys, { nKey, bBock } )
  101.         etc.
  102.  
  103.         NOTE: You may want to save any setkeys you
  104.         have active which conflict with keys set here
  105.         before entering the browse. Remember to reset
  106.         them later.
  107.  
  108.         5. Define Mouse Hot Spots:
  109.  
  110.         nHandle := twBRHotSpot( nT, nL, nB, nR, ;
  111.                                 bAction, nButton,
  112.                                 nSleep, lRelease )
  113.  
  114.         6. Call the browse:
  115.  
  116.         twBRBrowse( wT, wL, wB, wR, aColumns, ;
  117.                     cTitle, aFooters, cTopKey, ;
  118.                     bScopeBlock, lEditFlag, ;
  119.                     aActionKeys, wColor, wSType, ;
  120.                     wFType, wFColor, lScBar, lMsgs, ;
  121.                     lAlite, nFreeze, lStabilize, ;
  122.                     bPreRun, bPostRun, nExitKey,
  123.                     aSeparators, lOKAppend, lSound )
  124.  
  125.         7. Release Mouse Hot Spots:
  126.  
  127.         twBRRemHotSpot( nHandle )
  128.  
  129.         You MUST remove any mouse spots you set up
  130.         to release the memory they use when you are
  131.         finished with them.
  132.  
  133.  
  134.  
  135.